import java.util.Scanner;

public class Pizza {
    private String name;
    private int price;
    private int size;
    public Pizza(){}
    public Pizza(int price, int size) {
        this.price = price;
        this.size = size;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }
    public String showInfo(){
        Scanner input=new Scanner(System.in);
        System.out.print("请输入披萨大小：");
        int price=input.nextInt();
        System.out.print("请输入披萨价格：");
        int size=input.nextInt();
        this.setPrice(price);
        this.setSize(size);
        String message=String.format("名称:"+getName()+"\n价格："+getPrice()+"元\n大小："+getSize()+"寸");
        return message;
    }
}
